<?php
/**
 * Nuwani PHP IRC Bot Framework
 * Copyright (c) 2006-2010 The Nuwani Project
 *
 * Nuwani is a framework for IRC Bots built using PHP. Nuwani speeds up bot 
 * development by handling basic tasks as connection- and bot management, timers
 * and module managing. Features for your bot can easily be added by creating
 * your own modules, which will receive callbacks from the framework.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @copyright Copyright (c) 2006-2010 The Nuwani Project
 * @package Nuwani
 * @author Peter Beverloo <peter@lvp-media.com>
 * @see http://nuwani.googlecode.com
 */

require_once __DIR__ . '/../src/Sources/MessageFactory.php';

use Nuwani \ Message;

class MessageTest extends PHPUnit_Framework_TestCase
{
        /**
         * These tests rely on UnknownMessage to be available, considering the Message class
         * itself is declared as an abstract class. This means no instance can be created.
         */
        
        /**
         * @author Peter Beverloo <peter@lvp-media.com>
         * @covers UnknownMessage::__construct
         * @covers Message::__construct
         * @covers Message::type
         * @since 2010-10-02
         * @test
         */
        public function constructorSettingMessageType ()
        {
                $message = Message :: create (null);
                
                $this -> assertTrue ($message -> type () === Message :: MESSAGE_TYPE_UNKNOWN);
        }
};
